﻿<%@ Assembly Name="$SharePoint.Project.AssemblyFullName$" %>
<%@ Import Namespace="Microsoft.SharePoint.ApplicationPages" %>
<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="asp" Namespace="System.Web.UI" Assembly="System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" %>
<%@ Import Namespace="Microsoft.SharePoint" %>
<%@ Assembly Name="Microsoft.Web.CommandUI, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Datasheet.aspx.cs" Inherits="SPDatasheet.Layouts.SPDatasheet.Datasheet" DynamicMasterPageFile="~masterurl/default.master" %>

<asp:Content ID="PageHead" ContentPlaceHolderID="PlaceHolderAdditionalPageHead" runat="server">
    <script type="text/javascript">
        JSRequest.EnsureSetup();

        function StopEditing() {
            try {
                window.location.href = decodeURIComponent(JSRequest.QueryString["RootFolder"]);
            } catch (e) { }
        }
        function ResizeEditor() {
            if (oldOnResize != null) oldOnResize();

            var height = document.getElementById("s4-workspace").clientHeight;
            var parent = document.STSListControlWPQ2;
            do {
                height -= parent.offsetTop;
                parent = parent.offsetParent;
            } while (parent != null && parent.id != "s4-workspace");

            document.STSListControlWPQ2.height = height - 50;
        }
        var oldOnResize = null;
        function _spBodyOnLoad() {
            oldOnResize = window.onresize;
            ResizeEditor();            
            window.onresize = ResizeEditor;
        }
    </script>
</asp:Content>

<asp:Content ID="Main" ContentPlaceHolderID="PlaceHolderMain" runat="server">
    <!-- Stop Editing Button -->
    <div class="ms-list-addnew ms-textXLarge ms-list-addnew-aligntop ms-soften">
        <a title="Stop editing and save changes." onclick="StopEditing();return false;" href="javascript:;">Stop</a> editing this list
    </div>
    <!-- Datasheet View -->
    <asp:PlaceHolder ID="PlaceHolderSPDatasheet" runat="server"></asp:PlaceHolder>
</asp:Content>

<asp:Content ID="PageTitle" ContentPlaceHolderID="PlaceHolderPageTitle" runat="server">
Datasheet view
</asp:Content>

<asp:Content ID="PageTitleInTitleArea" ContentPlaceHolderID="PlaceHolderPageTitleInTitleArea" runat="server" >
Datasheet view
</asp:Content>